<template>
    <div>
        <van-nav-bar title="设置"/>
        <div class="button-wrap">
        <van-button type="primary" @click="reset">一键重置</van-button>
        </div>
    </div>
</template>
<script>
import { resetStorage } from '@/utils/storage.js'
import vanNavBar from "vant/lib/nav-bar";
import "vant/lib/nav-bar/style";
import vanButton from "vant/lib/button";
import "vant/lib/button/style";
export default {
    components: {
        vanButton,vanNavBar
    },
    methods: {
        reset() {
          this.$dialog.confirm({
            title: '重置确认',
            message: '是否确定清除所有项目数据以及二级分类数据？'
          }).then(() => {
            resetStorage();
          }).catch(() => {});
        }
    }
}
</script>
<style lang="less" scoped>
  .button-wrap{
    text-align: center;
    padding: 10px 0;
    .van-button{
      width: 90%;
      border-radius: 10px;
    }
  }
</style>
